'use strict';

/**
 * @ngdoc function
 * @name webApp.controller:ProductCtrl
 * @description
 * # ProductCtrl
 * Controller of the webApp
 */

angular.module('webApp')
  .controller('product', function ($scope,promiseProduct,$filter) {
    promiseProduct.products().then(function(data){
      var filter = _.memoize(function(data){
        return $filter('trustHtml',data)
      })();
      $scope.products = filter(data);
  })
});
